<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<link rel="stylesheet" type="text/css" href="/css/config.css" />

<!-- necessary reformed CSS -->
<!--[if IE]>
    <link rel="stylesheet" type="text/css" href="reformed/css/ie_fieldset_fix.css" />
<![endif]-->
<link rel="stylesheet" href="/reformed/css/uniform.aristo.css"
	type="text/css" />
<link rel="stylesheet" href="/reformed/css/ui.reformed.css"
	type="text/css" />
<link rel="stylesheet"
	href="/css/reformed-form-ui-lightness/jquery-ui-1.8.7.custom.css"
	type="text/css" />
<!-- end necessary reformed CSS -->

<!-- necessary reformed js -->
<script src="/reformed/js/jquery.uniform.min.js" type="text/javascript"></script>
<script src="/reformed/js/jquery.validate.min.js" type="text/javascript"></script>
<script src="/reformed/js/jquery.ui.reformed.min.js"
	type="text/javascript"></script>
<!-- end necessary reformed js -->

<script type="text/javascript">
	$(function() { //on doc ready
		//set validation options
		//(this creates range messages from max/min values)
		$.validator.autoCreateRanges = true;
		$.validator.setDefaults({
			highlight : function(input) {
				$(input).addClass("ui-state-highlight");
			},
			unhighlight : function(input) {
				$(input).removeClass("ui-state-highlight");
			},
			errorClass : 'error_msg',
			wrapper : 'dd',
			errorPlacement : function(error, element) {
				error.addClass('ui-state-error');
				error.prepend('<span class="ui-icon ui-icon-alert"></span>');
				error.appendTo(element.closest('dl.ui-helper-clearfix').effect(
						'highlight', {}, 2000));
			}
		});

		//call reformed and the validation library on your form
		$('#YOURFORMID').reformed().validate();
	});
</script>

<title>Drug Dealer</title>
</head>
<body>
	<!-- Wrapper starts here -->
	<div class="wrapper">
		<!-- Header code goes here -->
		<div class="header">
			<div class="title_wrapper">
				<a href="
				<% Object loggedIn = request.getSession().getAttribute("email");
					String userType = (String) request.getSession().getAttribute("tipoUsuario");
					if(loggedIn != null) {
						if (userType.equals("admin")) { %>
						/seguranca/administrador/
						<% } else { %>
						/seguranca/${ tipoUsuario }/
						<% } %>
					<% } else { %>
						/
					<% } %>
				">
					<div class="header_title">Drug Dealer</div>
				</a>
				<div class="header_caption">The lord of the dealing systems</div>
			</div>
			<div class="login_status">
				<%
					if (request.getSession().getAttribute("email") == null) {
				%>
				<a href="<c:url value='/loginRedirect' />">Login</a>
				<%
					} else {
				%>
				Bem-vindo ${ email }! | <a href="<c:url value='/seguranca/logout' />">Logout</a>
				<%
					}
				%>
			</div>

			<!-- Header ends here -->
		</div>